/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package factoryMode.simpleFactory;

/**
 *静态工厂 创建对象
 * @author root
 */
public class Factory {
    public static ICreate generatorCreate(String type){
        ICreate create = null;
        switch(type){
            case "people":
                create = new People();
                break;
            case "animal":
                create = new Animal();
                break;
        }
        return create;
    }
}
